var app = require('http').createServer()
var io = require('socket.io')(app);
app.listen(8080);
var array1=0;
io.on('connection', function (socket) {
  	socket.on('goodsdata',function(data){
		socket.join('goodsdata');
	});
	socket.on('uskdata',function(data){
		socket.join('uskdata');
	});
	socket.on('ukdata',function(data){
		array1++;
		socket.join('ukdata');
		console.log(array1);

	});
	socket.on('disconnect',function(data){
      	console.log(data);
    })
});
var shujudata = [{jdjd:'dddd'}];

setInterval(function(){
	io.sockets.in('goodsdata').emit('event_name', shujudata);
	io.sockets.in('uskdata').emit('event_name', shujudata);
	io.sockets.in('ukdata').emit('event_name', shujudata);
},1500);
